<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://localhost:8080/Website/" />
<title>ViewBoardingPassSC1TC1</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">ViewBoardingPassSC1TC1</td></tr>
</thead><tbody>
<!--Created by Steven Chow-->
<!--Scenario 1: Boarding Pass Successfully Displayed-->
<!--Test Case 1: User requests viewing boarding pass haveing a valid ticket on their profile-->
<!---->
<!--Go to website-->
<tr>
	<td>open</td>
	<td>http://localhost:8080/Website/</td>
	<td></td>
</tr>
<!--Login-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-red &gt; div.tile-content.icon &gt; img</td>
	<td></td>
</tr>
<tr>
	<td>type</td>
	<td>name=username</td>
	<td>User9</td>
</tr>
<tr>
	<td>type</td>
	<td>name=password</td>
	<td>pass9</td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<tr>
	<td>assertTitle</td>
	<td>Customer Portal</td>
	<td></td>
</tr>
<!--Search for a Flight-->
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile-content.icon &gt; img</td>
	<td></td>
</tr>
<!--Search without using the filter-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Pick the 1st one-->
<tr>
	<td>click</td>
	<td>name=r1</td>
	<td></td>
</tr>
<!--Reserve-->
<tr>
	<td>clickAndWait</td>
	<td>css=div &gt; input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Fill in name, seat and choose meal-->
<tr>
	<td>type</td>
	<td>name=firstName</td>
	<td>Blue</td>
</tr>
<tr>
	<td>type</td>
	<td>name=lastName</td>
	<td>Bear</td>
</tr>
<tr>
	<td>type</td>
	<td>name=seatID</td>
	<td>C19</td>
</tr>
<tr>
	<td>click</td>
	<td>css=label.radio &gt; span</td>
	<td></td>
</tr>
<tr>
	<td>click</td>
	<td>name=mealOption</td>
	<td></td>
</tr>
<!--Proceed to Payment-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we are on the payment page-->
<tr>
	<td>assertTextPresent</td>
	<td>Payment</td>
	<td></td>
</tr>
<!--Use credit Card for all reservation tests-->
<tr>
	<td>click</td>
	<td>name=credit</td>
	<td></td>
</tr>
<!--Enter in correct value-->
<tr>
	<td>type</td>
	<td>name=credit</td>
	<td>100</td>
</tr>
<!--Make the payment-->
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we are back in the Customer portal page-->
<tr>
	<td>assertTitle</td>
	<td>Customer Portal</td>
	<td></td>
</tr>
<!--Check if there is a message saying that a reservation has been added.-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/div/div/div/h4</td>
	<td>1 new reservation added!</td>
</tr>
<!--Check if there is a View Boarding Pass Button-->
<tr>
	<td>assertElementPresent</td>
	<td>css=div.tile.bg-color-purple &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=div.tile.bg-color-purple &gt; div.tile-content.icon</td>
	<td></td>
</tr>
<!--Check if we are on the right page-->
<tr>
	<td>assertTitle</td>
	<td>View Boarding Pass</td>
	<td></td>
</tr>
<!--Check if our reservation is there-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/form/table/tbody/tr/td[2]/img</td>
	<td></td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/form/table/tbody/tr/td[3]</td>
	<td>Blue Bear</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/form/table/tbody/tr/td[6]</td>
	<td>C19</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div/div[2]/div/form/table/tbody/tr/td[7]</td>
	<td>A1</td>
</tr>
<tr>
	<td>click</td>
	<td>name=r1</td>
	<td></td>
</tr>
<tr>
	<td>clickAndWait</td>
	<td>css=input[type=&quot;submit&quot;]</td>
	<td></td>
</tr>
<!--Check if we have all the information filled-->
<tr>
	<td>assertText</td>
	<td>//html/body/div/font</td>
	<td>Blue</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[2]/font</td>
	<td>Bear</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[3]/font</td>
	<td>Vancouver</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[4]/font</td>
	<td>1000</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[5]/font</td>
	<td>Los Angeles</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[7]/font</td>
	<td>A1</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[8]/font</td>
	<td>13:00</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[9]/font</td>
	<td>Blue</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[10]/font</td>
	<td>Bear</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[11]/font</td>
	<td>2012-10-09 13:00</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[12]/font</td>
	<td>Economy</td>
</tr>
<tr>
	<td>assertText</td>
	<td>//html/body/div[13]/font</td>
	<td>C19</td>
</tr>
</tbody></table>
</body>
</html>
